<?php
namespace JsonLowCode\Support;

//enum Align {
//
//}

use JsonLowCode\Schema;

class VueDirective {
    protected array  $config = [

    ];

    /**
     * @param Schema $schema
     * @param string $bindName
     * @param string $modelName
     * @return Schema
     */
    public static function vModel(Schema $schema, string $bindName, string $modelName = ""): Schema
    {
        $options = [];
        if ($modelName&&$modelName!="modelValue"){
            $options['prop'] = $modelName;
        }
        return $schema->prop("v-model", JSExpression($bindName,['model'=>$options]));
    }


}